package org.dfrt.own.entity;

import java.io.Serializable;
import java.util.Objects;

/**
 * @author zhang
 * ClassName: User
 * Description: 用户实体类
 * date: 2023/10/3 18:39
 * @since JDK 8
 */
public class User implements Serializable {
    //用户id
    private Integer uid;
    //用户名
    private String uname;
    //用户生日
    private String ubirthday;
    //用户描述
    private String udesc;
    //用户密码
    private String upasswd;

    //页数
    private Integer page;

    public Integer getPage() {
        return page;
    }

    public void setPage(Integer page) {
        this.page = page;
    }

    public User() {
    }

    public User(Integer uid, String uname, String ubirthday, String udesc, String upasswd) {
        this.uid = uid;
        this.uname = uname;
        this.ubirthday = ubirthday;
        this.udesc = udesc;
        this.upasswd = upasswd;
    }

    public Integer getUid() {
        return uid;
    }

    public void setUid(Integer uid) {
        this.uid = uid;
    }

    public String getUname() {
        return uname;
    }

    public void setUname(String uname) {
        this.uname = uname;
    }

    public String getUbirthday() {
        return ubirthday;
    }

    public void setUbirthday(String ubirthday) {
        this.ubirthday = ubirthday;
    }

    public String getUdesc() {
        return udesc;
    }

    public void setUdesc(String udesc) {
        this.udesc = udesc;
    }

    public String getUpasswd() {
        return upasswd;
    }

    public void setUpasswd(String upasswd) {
        this.upasswd = upasswd;
    }

    @Override
    public String toString() {
        return "User{" +
                "uid=" + uid +
                ", uname='" + uname + '\'' +
                ", ubirthday=" + ubirthday +
                ", udesc='" + udesc + '\'' +
                ", upasswd='" + upasswd + '\'' +
                '}';
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (!(o instanceof User)) return false;
        User user = (User) o;
        return Objects.equals(uid, user.uid) && Objects.equals(uname, user.uname) && Objects.equals(ubirthday, user.ubirthday) && Objects.equals(udesc, user.udesc) && Objects.equals(upasswd, user.upasswd);
    }

    @Override
    public int hashCode() {
        return Objects.hash(uid, uname, ubirthday, udesc, upasswd);
    }
}
